Update comment to be more clear and print a warning if we try to create a
authorRichard Hult <richard@imendio.com>
Wed, 6 Jun 2007 08:29:20 +0000 (08:29 +0000)
committerRichard Hult <rhult@src.gnome.org>
Wed, 6 Jun 2007 08:29:20 +0000 (08:29 +0000)
2007-06-06  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkevents-quartz.c (synthesize_crossing_events):
Update comment to be more clear and print a warning if we try to
create a crossing event without knowing what the current mouse
window is, to help track down focus bugs.

* gdk/quartz/gdkevents-quartz.c
(_gdk_quartz_events_update_focus_window): Fix indentation.

svn path=/trunk/; revision=18047

ChangeLog
gdk/quartz/gdkevents-quartz.c

index c136d828384e2a84378df9e8fac3624a2723d0e5..a18aa798aa4642068ca38a3c4bc23e2c68fda78d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,14 @@
-2007-06-05  Richard Hult  <richard@imendio.com>
+2007-06-06  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkevents-quartz.c (synthesize_crossing_events):
+       Update comment to be more clear and print a warning if we try to
+       create a crossing event without knowing what the current mouse
+       window is, to help track down focus bugs.
+
+       * gdk/quartz/gdkevents-quartz.c
+       (_gdk_quartz_events_update_focus_window): Fix indentation.
+
+2007-06-06  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/GdkQuartzWindow.c: Don't let temp windows become key
        window.
index 73863a5d7557b853f43f7d160020db13904c16dd..fc0335fd934dd45889143aa8f4000c59ceefe061 100644 (file)
@@ -495,10 +495,10 @@ _gdk_quartz_events_update_focus_window (GdkWindow *window,
   
   if (!got_focus && window == current_keyboard_window)
     {
-         event = create_focus_event (current_keyboard_window, FALSE);
-         append_event (event);
-         g_object_unref (current_keyboard_window);
-         current_keyboard_window = NULL;
+      event = create_focus_event (current_keyboard_window, FALSE);
+      append_event (event);
+      g_object_unref (current_keyboard_window);
+      current_keyboard_window = NULL;
     }
 
   if (got_focus)
@@ -755,15 +755,12 @@ synthesize_crossing_events (GdkWindow      *window,
     }
   else
     {
-      /* This means we have not current_mouse_window. FIXME: Should
-       * we make sure to always set the root window instead of NULL?
+      /* This means we have no current_mouse_window, which probably
+       * means that there is a bug somewhere, we should always have
+       * the root in we don't have another window. Does this ever
+       * happen?
        */
-
-      /* FIXME: Figure out why this is being called with window being
-       * NULL. The check works around a crash for now.
-       */ 
-      if (window)
-       synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN);
+      g_warning ("Trying to create crossing event when current_mouse_window is NULL");
     }
   
   _gdk_quartz_events_update_mouse_window (window);